package com.ruoyi.notes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.notes.mapper.IndexNotesMapper;
import com.ruoyi.notes.domain.IndexNotes;
import com.ruoyi.notes.service.IIndexNotesService;

/**
 * 备忘录Service业务层处理
 * 
 * @author yx
 * @date 2024-12-19
 */
@Service
public class IndexNotesServiceImpl implements IIndexNotesService 
{
    @Autowired(required = false)
    private IndexNotesMapper indexNotesMapper;

    /**
     * 查询备忘录
     * 
     * @param notesId 备忘录主键
     * @return 备忘录
     */
    @Override
    public IndexNotes selectIndexNotesByNotesId(String notesId)
    {
        return indexNotesMapper.selectIndexNotesByNotesId(notesId);
    }

    /**
     * 查询备忘录列表
     * 
     * @param indexNotes 备忘录
     * @return 备忘录
     */
    @Override
    public List<IndexNotes> selectIndexNotesList(IndexNotes indexNotes)
    {
        return indexNotesMapper.selectIndexNotesList(indexNotes);
    }

    /**
     * 新增备忘录
     * 
     * @param indexNotes 备忘录
     * @return 结果
     */
    @Override
    public int insertIndexNotes(IndexNotes indexNotes)
    {
        return indexNotesMapper.insertIndexNotes(indexNotes);
    }

    /**
     * 修改备忘录
     * 
     * @param indexNotes 备忘录
     * @return 结果
     */
    @Override
    public int updateIndexNotes(IndexNotes indexNotes)
    {
        return indexNotesMapper.updateIndexNotes(indexNotes);
    }

    /**
     * 批量删除备忘录
     * 
     * @param notesIds 需要删除的备忘录主键
     * @return 结果
     */
    @Override
    public int deleteIndexNotesByNotesIds(String[] notesIds)
    {
        return indexNotesMapper.deleteIndexNotesByNotesIds(notesIds);
    }

    /**
     * 删除备忘录信息
     * 
     * @param notesId 备忘录主键
     * @return 结果
     */
    @Override
    public int deleteIndexNotesByNotesId(String notesId)
    {
        return indexNotesMapper.deleteIndexNotesByNotesId(notesId);
    }
}
